home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3s / system.z / system
Encoding:
Text File  |  2002-10-03  |  4.1 KB  |  67 lines

  1.  
  2.  
  3.  
  4. ssssyyyysssstttteeeemmmm((((3333SSSS))))                                                          ssssyyyysssstttteeeemmmm((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _ssss_yyyy_ssss_tttt_eeee_mmmm - issue a shell command
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_tttt_dddd_llll_iiii_bbbb_...._hhhh_>>>>
  13.  
  14.      _iiii_nnnn_tttt _ssss_yyyy_ssss_tttt_eeee_mmmm _((((_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_ssss_tttt_rrrr_iiii_nnnn_gggg_))))_;;;;
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      _ssss_yyyy_ssss_tttt_eeee_mmmm causes the _s_t_r_i_n_g to be given to the shell [see _ssss_hhhh(1)] as input,
  18.      as if the string had been typed as a command at a terminal.  The current
  19.      process waits until the shell has completed, then returns the exit status
  20.      of the shell in the format specified by _wwww_aaaa_iiii_tttt_pppp_iiii_dddd(2).  The _ssss_yyyy_ssss_tttt_eeee_mmmm function
  21.      ignores the SIGINT and SIGQUIT signals, and blocks the SIGCHLD signal,
  22.      while waiting for the command to terminate.
  23.  
  24.      If _s_t_r_i_n_g is a _NNNN_UUUU_LLLL_LLLL pointer, _ssss_yyyy_ssss_tttt_eeee_mmmm checks if _////_ssss_bbbb_iiii_nnnn_////_ssss_hhhh exists and is
  25.      executable.  If _////_ssss_bbbb_iiii_nnnn_////_ssss_hhhh is available, _ssss_yyyy_ssss_tttt_eeee_mmmm returns non-zero; otherwise
  26.      it returns zero.
  27.  
  28.      _ssss_yyyy_ssss_tttt_eeee_mmmm fails if one or more of the following are true:
  29.  
  30.      _EEEE_AAAA_GGGG_AAAA_IIII_NNNN      The system-imposed limit on the total number of processes
  31.                  under execution by a single user would be exceeded.
  32.  
  33.      _EEEE_IIII_NNNN_TTTT_RRRR       _ssss_yyyy_ssss_tttt_eeee_mmmm was interrupted by a signal.
  34.  
  35.      _EEEE_NNNN_OOOO_MMMM_EEEE_MMMM      The new process requires more memory than is allowed by the
  36.                  system-imposed maximum _MMMM_AAAA_XXXX_MMMM_EEEE_MMMM.
  37.  
  38. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  39.      _eeee_xxxx_eeee_cccc(2), _wwww_aaaa_iiii_tttt_pppp_iiii_dddd(2), _ssss_hhhh(1).
  40.  
  41. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  42.      _ssss_yyyy_ssss_tttt_eeee_mmmm forks to create a child process that in turn execs _////_ssss_bbbb_iiii_nnnn_////_ssss_hhhh in
  43.      order to execute _s_t_r_i_n_g.  If the fork or exec fails, _ssss_yyyy_ssss_tttt_eeee_mmmm returns -1
  44.      and sets _eeee_rrrr_rrrr_nnnn_oooo.
  45.  
  46. NNNNOOOOTTTTEEEESSSS
  47.      Calling _ssss_yyyy_ssss_tttt_eeee_mmmm(3S) in a program that is set user ID to _rrrr_oooo_oooo_tttt is difficult
  48.      to do without creating unintended security problems.  For example, since
  49.      _ssss_yyyy_ssss_tttt_eeee_mmmm invokes a copy of _ssss_hhhh(1) to execute the supplied command, the
  50.      programmer must be extremely careful not to allow critical environment
  51.      variables, such as _PPPP_AAAA_TTTT_HHHH, which determine the behavior of the shell to be
  52.      passed through from the environment of the invoking user without
  53.      modification.  It is recommended that _ssss_yyyy_ssss_tttt_eeee_mmmm(3S) not be used by set user
  54.      ID programs.
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.